#ifndef TREEWIDGET_H
#define TREEWIDGET_H

#include <QTreeWidget>

class QMouseEvent;


class TreeWidget : public QTreeWidget {
	Q_OBJECT
    public:
		explicit TreeWidget(QWidget *parent = 0);

        /*! Returns a string with toplevel item's text
          for currently selected item. Example:
           - foo
             - item1
             - item2 <- selected
             - item3
          so "foo" is returned.
          QString() (null) is returned if there is not any selection
          */
        QString currentTopLevelText(int column=0);
    
	protected:
		void mousePressEvent(QMouseEvent *event);
        void keyPressEvent(QKeyEvent *event);

    signals:
		void mousePressed(QMouseEvent *event);
		void keyPressed(QKeyEvent *event);
		void itemMouseClicked(QTreeWidgetItem *item, int column);

    public slots:
    
};


#endif // TREEWIDGET_H
